// LinkedList.cpp : Defines the entry point for the console application.
//

#include "stdio.h"
#include "string.h"




int main(int argc, char* argv[])
{
	unsigned int i, j;
	unsigned char c;

	//char *str = "Battle"; makes str immutable : compiler may place it in read only memory etc : http://c-faq.com/~scs/cclass/krnotes/sx8e.html
	char str[] = "Battle of the Vowels: Hawaii vs. Grozny";
	char remove[] = "aeiou:.";

	int ht[256];

	//Init hashtable
	for(i=0; i<256; ht[i] = 0, i++);

	//Mark the chars to be removed in the ht
	for(i=0; i<strlen(remove); i++){
		c = (unsigned char)remove[i];
		ht[c] = 1;

		printf("%d) %c, %d, %d\n", i, c, c, ht[c]);
	}

	
	i=0;
	j=0;
	while(str[i]){
		
		
		if(ht[(unsigned char)str[i]] == 0){		
			if(i>j)
				str[j] = str[i];		

			j++;
		}

		i++;
	}

	str[j] = '\0';

	printf("%s\n", str);


	
	return 0;
}

